From: Zhao Zhili Date: Mon, 23 Sep 2024 16:16:13 +0000 (+0800) Subject: avformat/img2enc: Fix integer truncation when frame_pts is enabled X-Git-Tag: archive/raspbian/7%8.1-3+rpi1~1^2^2^2^2~13 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/success//%22mailto:kde%40ewsoftware.de/%22/%22http:/www.example.com/cgi/success/%22mailto:kde%40ewsoftware.de/%22?a=commitdiff_plain;h=1fe8cd6d87639defceff7a7fc0c99536c88b14f2;p=ffmpeg.git avformat/img2enc: Fix integer truncation when frame_pts is enabled Fix #11194 Signed-off-by: Zhao Zhili (cherry picked from commit f56a54387b9cea884ca139e9cb993ff6989b8def) Gbp-Pq: Name 0003-avformat-img2enc-Fix-integer-truncation-when-frame_p.patch --- diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c index 526a11e5..41638d92 100644 --- a/libavformat/img2enc.c +++ b/libavformat/img2enc.c @@ -160,13 +160,13 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) return AVERROR(EINVAL); } } else if (img->frame_pts) { - if (av_get_frame_filename2(filename, sizeof(filename), s->url, pkt->pts, AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0) { + if (ff_get_frame_filename(filename, sizeof(filename), s->url, pkt->pts, AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0) { av_log(s, AV_LOG_ERROR, "Cannot write filename by pts of the frames."); return AVERROR(EINVAL); } - } else if (av_get_frame_filename2(filename, sizeof(filename), s->url, - img->img_number, - AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0) { + } else if (ff_get_frame_filename(filename, sizeof(filename), s->url, + img->img_number, + AV_FRAME_FILENAME_FLAGS_MULTIPLE) < 0) { if (img->img_number == img->start_img_number) { av_log(s, AV_LOG_WARNING, "The specified filename '%s' does not contain an image sequence pattern or a pattern is invalid.\n", s->url); av_log(s, AV_LOG_WARNING,